from urllib.request import urlopen
import requests

query = input("输入名字")

url = f"https://www.sogou.com/web?query={query}"
headers = {
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 \
    (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"
}
resp = requests.get(url,headers = headers)

print(resp)
print(resp.text)
resp.close()